Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhide the classic menu widget #32431

Merged
merged 1 commit into from
Jun 8, 2021
Merged

Unhide the classic menu widget #32431

merged 1 commit into from
Jun 8, 2021

Conversation

draganescu
Copy link
Contributor

@draganescu draganescu commented Jun 3, 2021

Description

According to the Track ticket 53301

The legacy "Navigation Menu" widget is missing from the block-widget inserter

All the classic widgets have been replaced by blocks and hence the decision to hide them from being used makes sense. However the "Navigation Menu" widget is not fully replaced by the Navigation because the Navigation block is currently missing the ability to update itself if a classic menu has been changed. The Navigation block can only import a classic menu, creating a static copy of it. This behavior is different and unexpected in the widgets context.

While the LegacyWidget block does display the "Navigation Menu" widget, adding new ones is not possible without this change. It should be possible, considering we don't even have a transform yet from the "Navigation Menu" widget to the Navigatioin block, liike all the other core classic widgets do.

How has this been tested?

  1. With Gutenberg trunk active
  2. Go to Appearance > Widgets
  3. Open the inserter from the top blue plus button
  4. Insert a "Navigation Menu" from the "Widgets" section
  5. It should work.

Screenshots

navigation-menu-widget

Types of changes

Removed the nav_menu widget from the widget_types_to_hide_from_legacy_widget_block filter.
Also fixed a typo in a comment.

@draganescu draganescu changed the title use the classic menu widget again Unhide the classic menu widget Jun 3, 2021
@draganescu draganescu self-assigned this Jun 3, 2021
@draganescu draganescu added [Block] Navigation Affects the Navigation Block [Package] Edit Widgets /packages/edit-widgets labels Jun 3, 2021
Copy link
Member

@noisysocks noisysocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to merge but note it only fixes WordPress 5.7 running the Gutenberg plugin (and therefore doesn't need to be backported.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Package] Edit Widgets /packages/edit-widgets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants